package mapper;

import model.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

//@Mapper
//@Repository
public interface UserMapper {



    public User findUserByNameAndPassword(@Param("username")String username, @Param("password")String password);


    public int selectCount(HashMap<String, Object> map);

    //通过起始记录，和记录size放到一个hashMap再封装到List里

    public List<play_list> findByPage(HashMap<String, Object> map);



        List<game_list>get_game_lists();


       void new_apply(game_list game_list);

      public game_list find_list_by_name_state(@Param("player")String player,@Param("play_state")int play_state);


      public void insert_play_list(play_list play_list);


    public void  update_play_list(play_list play_list);

    public void delete(int id);



    public play_list find_play_list_ById(int id);




    public void visiter_login(play_list play_list);


   public void insert_home_list(home_list home_list);


    public List<home_list>  find_game_list_ByName(@Param("username")String username);



    public void change_home_list_state(home_list home_list);


    public home_list find_home_list_byId(int id);



    public home_list find_home_list_by_visiter_state(@Param("visiter")String visiter,@Param("home_state")int home_state);




    
    public void insert_follower_list(follower_list follower_list);

    public void insert_fan_list(fan_list fan_list);



    public List<follower_list> find_follow_list_byName(String name);

    public List<fan_list> find_fan_list_byName(String name);


    public void not_follow(follower_list follower_list);

    public void not_fan(fan_list fan_list);

    public void insert_information(information information);

    public List<information>find_information_byName(String username);
}
